#include "heroplane.h"
#include "config.h"
HeroPlane::HeroPlane()
{
    //加载飞机资源
    m_Plane.load(HERO_PATH);
    //初始化坐标
    m_X=GAME_WIDTH*0.5-m_Plane.width()*0.5;
    m_Y=GAME_HEIGHT-m_Plane.height()-120;
    //碰撞框
    m_Rect.setWidth(m_Plane.width());
    m_Rect.setHeight(m_Plane.height());
    m_Rect.moveTo(m_X,m_Y);


}

void HeroPlane::shoot()
{

}

void HeroPlane::setPosition(int x, int y)
{
    m_X=x;
    m_Y=y;
    m_Rect.moveTo(m_X,m_Y);

}
